package com.bac.rentmap.ad.crawler.stepped;

import java.io.IOException;
import java.util.List;

import com.bac.rentmap.ad.crawler.CrawledAd;

/**
 * Crawls adds in several steps. Typically because of result paging.
 * 
 * @author Andrew Osipenko
 */
public interface SteppedAdCrawler<T extends CrawledAd> {
	/**
	 * Crawls next portion of ads. Returns <code>null</code> in case crawling is
	 * finished.
	 * 
	 * @return <code>null</code> in case crawling is finished.
	 * @throws IOException 
	 */
	List<T> crawlNext() throws IOException;
}
